package de.wtschreiter.structured.document.io.event.basic;

import java.util.Map;

import de.wtschreiter.structured.document.io.event.AbstractStartElementEventTest;

public class BasicStartElementEventTest extends AbstractStartElementEventTest<BasicStartElementEvent> {

    @Override
    protected BasicStartElementEvent newStartElementEvent(final String namespace, final String name,
            final Map<String, String> attributes) {
        final BasicStartElementEvent basicStartElementEvent = new BasicStartElementEvent();
        if (attributes != null) {
            basicStartElementEvent.setAttributes(attributes);
        }
        if (namespace != null) {
            basicStartElementEvent.setNamespace(namespace);
        }
        if (name != null) {
            basicStartElementEvent.setName(name);
        }
        return basicStartElementEvent;
    }

}
